<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" id='userId' name="row[userId]" value='$row.id' disabled />
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" disabled id="username" name="row[username]" value="{$row.username|htmlentities}" data-rule="required;username" />
        </div>
    </div>

    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" disabled id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname|htmlentities}" data-rule="required" />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">所在部门:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[department_id]', $groupdata, $row['department_id'], ['class'=>'form-control selectpicker', 'data-rule'=>'required', 'data-id'=>$row['department_id'], 'data-pid'=>$row['department_id']])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">授权部门:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('departments[]', $groupdata, $depts, ['class'=>'form-control selectpicker', 'multiple'=>'' ,'data-rule'=>'required', 'data-id'=>$row['department_id']])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>